#include "libtest.h"

/**
 * @defgroup mod1 test2
 * @{
 * @brief 模块定义测试
 * @}*/

/**
 * @defgroup mod2 test4
 * @{
 * @ingroup mod1
 * @brief 模块定义测试123.
 * @}*/

/**@addtogroup mod1 */
/*@{*/
int test()
{
  logD("");
  return 0;
}

int test_un_use()
{
  logD("");
  return 0;
}
/*@}*/

/**@addtogroup mod2 */
/*@{*/
int json_data_handle( char *input, char *output )
{
    int ret = -1;

    cJSON *outjson = cJSON_CreateObject();

    cJSON_AddItemToObject( outjson, "deviceType", cJSON_CreateNumber( 7 ) );
    cJSON_AddItemToObject( outjson, "deviceId", cJSON_CreateString("test") );
    cJSON_AddItemToObject( outjson, "version", cJSON_CreateString("1.0.1") );

    do{
    }while(0);

    if( output != NULL )
    {
        strcpy( output, cJSON_PrintUnformatted( outjson ) );
    }

    cJSON_Delete( outjson );

    return ret;
}

/*@}*/

int local_fun_test()
{
  return 0;
}


__attribute__((weak)) void callbackfun()
{
  logE("This is %s(),Is a weak function. Please implement it!!!", __func__);
}
